; Garmentmaker

; Constants -------------------------

[Constants]
global persist $chest = 0
global persist $skirt = 0
global persist $wing = 0
global $active = 0
global $creditinfo = 0
global $active = 0
global $creditinfo = 0

[KeySwapchest]
key = [
condition = $active == 1
type = cycle
$chest = 0,1

[KeySwapskirt]
key = ]
condition = $active == 1
type = cycle
$skirt = 0,1

[KeySwapwing]
key = p
condition = $active == 1
type = cycle
$wing = 0,1

[Present]
post $active = 0
run = CommandListCreditInfo

; Overrides -------------------------

[TextureOverrideGarmentmakerbodyBlend]
hash = 31d815ee
handling = skip
vb2 = ResourceGarmentmakerbodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceGarmentmakerbodyPosition
	draw = 39613,0
endif
$active = 1

[TextureOverrideGarmentmakerbodyTexcoord]
hash = 5162aca2
vb1 = ResourceGarmentmakerbodyTexcoord

[TextureOverrideGarmentmakerbodyVertexLimitRaise]
hash = 3d4149cc
; override_vertex_count = 39613
; override_byte_stride = 84

[TextureOverrideGarmentmakerbodyIB]
hash = c77c060a
handling = skip

[TextureOverrideGarmentmakerbodyA]
hash = c77c060a
match_first_index = 0
ib = null

[TextureOverrideGarmentmakerbodyADiffuse]
hash = aee5ceaa
this = ResourceGarmentmakerbodyADiffuse

[TextureOverrideGarmentmakerbodyALightMap]
hash = 8972329c
this = ResourceGarmentmakerbodyALightMap

[TextureOverrideGarmentmakerbodyB]
hash = c77c060a
match_first_index = 16878
ib = ResourceGarmentmakerbodyBIB
; GarmentmakerbodyB-vb0=484b5014.txt.017 (24127)
drawindexed = 101124, 0, 0
if $chest == 0
	drawindexed = 4863, 119019, 0
else if $chest == 1
	drawindexed = 15261, 101124, 0
endif
if $skirt == 0
	drawindexed = 2634, 116385, 0
endif
if $wing == 0
	drawindexed = 35433, 123882, 0
endif


; CommandList -----------------------

[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1
    pre Resource\ShaderFixes\help.ini\Notification = ResourceCreditInfo
    pre run = CustomShader\ShaderFixes\help.ini\FormatText
    pre $\ShaderFixes\help.ini\notification_timeout = time + 5.0
    $creditinfo = 1
endif

; Resources -------------------------

[ResourceGarmentmakerbodyPosition]
type = Buffer
stride = 40
filename = GarmentmakerbodyPosition.buf

[ResourceGarmentmakerbodyBlend]
type = Buffer
stride = 32
filename = GarmentmakerbodyBlend.buf

[ResourceGarmentmakerbodyTexcoord]
type = Buffer
stride = 12
filename = GarmentmakerbodyTexcoord.buf

[ResourceGarmentmakerbodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = GarmentmakerbodyA.ib

[ResourceGarmentmakerbodyBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = GarmentmakerbodyB.ib

[ResourceGarmentmakerbodyADiffuse]
filename = GarmentmakerbodyADiffuse.dds

[ResourceGarmentmakerbodyALightMap]
filename = GarmentmakerbodyALightMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by LHQ70"

; .ini generated by XXMI (XX-Model-Importer)
; If you have any issues or find any bugs, please open a ticket at https://github.com/leotorrez/XXMI-Tools/issues